
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>常见代码示例 · 启路框架-使用手册</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-insert-logo/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-toggle-chapters/toggle.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-lightbox/css/lightbox.min.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    


    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../test/readme.html" />
    
    
    <link rel="prev" href="sso.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    整体介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../ready/ready.html">
            
                <a href="../ready/ready.html">
            
                    
                    技术准备
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../ready/ide.html">
            
                <a href="../ready/ide.html">
            
                    
                    eclipse
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../ready/build.html">
            
                <a href="../ready/build.html">
            
                    
                    本地构建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../ready/nexus.html">
            
                <a href="../ready/nexus.html">
            
                    
                    私服构建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../ready/run.html">
            
                <a href="../ready/run.html">
            
                    
                    运行调试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../ready/specification.html">
            
                <a href="../ready/specification.html">
            
                    
                    结构和分包
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../base/baseReadme.html">
            
                <a href="../base/baseReadme.html">
            
                    
                    基础包介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../base/qiluTask-readme.html">
            
                <a href="../base/qiluTask-readme.html">
            
                    
                    qilu-task
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../base/cache-readme.html">
            
                <a href="../base/cache-readme.html">
            
                    
                    qilucache
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../base/qiluMybatis-readme.html">
            
                <a href="../base/qiluMybatis-readme.html">
            
                    
                    qilu-mybatis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../base/logTrace-readme.html">
            
                <a href="../base/logTrace-readme.html">
            
                    
                    qilu-logTrace
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../base/qilu-export-readme.html">
            
                <a href="../base/qilu-export-readme.html">
            
                    
                    qilu-export
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../base/httpService-readme.html">
            
                <a href="../base/httpService-readme.html">
            
                    
                    qilu-http-service
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../base/validateReadme.html">
            
                <a href="../base/validateReadme.html">
            
                    
                    qilu-validate
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../state/state-course.html">
            
                <a href="../state/state-course.html">
            
                    
                    交易一致的由来
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../state/state-settle.html">
            
                <a href="../state/state-settle.html">
            
                    
                    qilu-state使用说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../state/state-demo.html">
            
                <a href="../state/state-demo.html">
            
                    
                    购买订单的处理示例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="backSampleReadme.html">
            
                <a href="backSampleReadme.html">
            
                    
                    后台代码模板
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="security.html">
            
                <a href="security.html">
            
                    
                    安全介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="deploy.html">
            
                <a href="deploy.html">
            
                    
                    部署集成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="config.html">
            
                <a href="config.html">
            
                    
                    spring配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="sso.html">
            
                <a href="sso.html">
            
                    
                    SSO集成
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5.5" data-path="example.html">
            
                <a href="example.html">
            
                    
                    常见代码示例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../test/readme.html">
            
                <a href="../test/readme.html">
            
                    
                    关于测试
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../test/unitTest.html">
            
                <a href="../test/unitTest.html">
            
                    
                    单元测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../test/function.html">
            
                <a href="../test/function.html">
            
                    
                    功能测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../test/noFunction.html">
            
                <a href="../test/noFunction.html">
            
                    
                    非功能测试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../video/test.html">
            
                <a href="../video/test.html">
            
                    
                    视频
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../video/build.html">
            
                <a href="../video/build.html">
            
                    
                    项目构建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../video/state.html">
            
                <a href="../video/state.html">
            
                    
                    交易一致
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >常见代码示例</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5E38;&#x89C1;&#x7F16;&#x7A0B;&#x793A;&#x4F8B;">&#x5E38;&#x89C1;&#x7F16;&#x7A0B;&#x793A;&#x4F8B;</h1>
<h2 id="&#x6309;&#x94AE;&#x7684;&#x6743;&#x9650;&#x63A7;&#x5236;">&#x6309;&#x94AE;&#x7684;&#x6743;&#x9650;&#x63A7;&#x5236;</h2>
<p>&#x9875;&#x9762;&#x4F7F;&#x7528;securityCheck&#x6807;&#x7B7E;</p>
<pre class="language-"><code class="lang-java">#<span class="token keyword">if</span><span class="token punctuation">(</span>$securityCheck<span class="token punctuation">.</span><span class="token function">hasPermission</span><span class="token punctuation">(</span><span class="token string">&quot;user:configInfo:add&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token operator">&lt;</span>a <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;btn btn-success&quot;</span> onclick<span class="token operator">=</span><span class="token string">&quot;jQuery.operate.add()&quot;</span> shiro<span class="token operator">:</span>hasPermission<span class="token operator">=</span><span class="token string">&quot;system:config:add&quot;</span><span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>i <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;fa fa-plus&quot;</span><span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>i<span class="token operator">&gt;</span> &#x65B0;&#x589E;
<span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span>
#end
</code></pre>
<p>controller&#x4F7F;&#x7528;securityCheck&#x6CE8;&#x89E3;</p>
<pre class="language-"><code class="lang-java"><span class="token annotation punctuation">@SecurityChecker</span><span class="token punctuation">(</span><span class="token string">&quot;user:configInfo:add&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">public</span> <span class="token class-name">String</span> <span class="token function">addPre</span><span class="token punctuation">(</span><span class="token class-name">ModelMap</span> model <span class="token punctuation">,</span> <span class="token class-name">String</span> id<span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">if</span><span class="token punctuation">(</span><span class="token class-name">StringUtils</span><span class="token punctuation">.</span><span class="token function">isNotBlank</span><span class="token punctuation">(</span>id<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
</code></pre>
<p>&#x8868;&#x683C;&#x5185;&#x7684;&#x6309;&#x94AE;&#x6743;&#x9650;&#x63A7;&#x5236;</p>
<pre class="language-"><code class="lang-javascript"><span class="token keyword">var</span> editFlag <span class="token operator">=</span> $securityCheck<span class="token punctuation">.</span><span class="token function">hasPermission</span><span class="token punctuation">(</span><span class="token string">&quot;user:configInfo:edit&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token punctuation">{</span>
    title<span class="token operator">:</span> <span class="token string">&apos;&#x64CD;&#x4F5C;&apos;</span><span class="token punctuation">,</span>
    align<span class="token operator">:</span> <span class="token string">&apos;center&apos;</span><span class="token punctuation">,</span>
    <span class="token function-variable function">formatter</span><span class="token operator">:</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">value<span class="token punctuation">,</span> row<span class="token punctuation">,</span> index</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">var</span> actions <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        actions<span class="token punctuation">.</span><span class="token function">push</span><span class="token punctuation">(</span><span class="token string">&apos;&lt;a class=&quot;btn btn-success btn-xs &apos;</span> <span class="token operator">+</span> editFlag <span class="token operator">+</span> <span class="token string">&apos;&quot; href=&quot;#&quot; onclick=&quot;jQuery.operate.edit(\&apos;&apos;</span> <span class="token operator">+</span> row<span class="token punctuation">.</span>id <span class="token operator">+</span> <span class="token string">&apos;\&apos;)&quot;&gt;&lt;i class=&quot;fa fa-edit&quot;&gt;&lt;/i&gt;&#x7F16;&#x8F91;&lt;/a&gt; &apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> actions<span class="token punctuation">.</span><span class="token function">join</span><span class="token punctuation">(</span><span class="token string">&apos;&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre>
<hr>
<h2 id="&#x5B57;&#x6BB5;&#x6709;&#x6548;&#x6027;&#x6821;&#x9A8C;">&#x5B57;&#x6BB5;&#x6709;&#x6548;&#x6027;&#x6821;&#x9A8C;</h2>
<h2 id="&#x6570;&#x636E;&#x5B57;&#x5178;&#x7684;&#x4F7F;&#x7528;">&#x6570;&#x636E;&#x5B57;&#x5178;&#x7684;&#x4F7F;&#x7528;</h2>
<p>&#x7CFB;&#x7EDF;&#x4E2D;&#x9ED8;&#x8BA4;&#x96C6;&#x6210;&#x4E86;&#x6570;&#x636E;&#x5B57;&#x5178;.</p>
<h3 id="&#x9875;&#x9762;&#x67E5;&#x8BE2;">&#x9875;&#x9762;&#x67E5;&#x8BE2;</h3>
<p>&#x4F7F;&#x7528;enumTag,&#x901A;&#x8FC7;&#x548C;velocity&#x8BED;&#x6CD5;&#x7ED3;&#x5408;,&#x76F4;&#x63A5;&#x5728;&#x9875;&#x9762;&#x4E0A;&#x6E32;&#x67D3;&#x4E0B;&#x62C9;&#x9009;&#x9879;.</p>
<pre class="language-"><code class="lang-javascript"><span class="token operator">&lt;</span>li<span class="token operator">&gt;</span>
&#x72B6;&#x6001;&#xFF1A;<span class="token operator">&lt;</span>select name<span class="token operator">=</span><span class="token string">&quot;visible&quot;</span> <span class="token operator">&gt;</span>
<span class="token operator">&lt;</span>option value<span class="token operator">=</span><span class="token string">&quot;&quot;</span><span class="token operator">&gt;</span>&#x6240;&#x6709;<span class="token operator">&lt;</span><span class="token operator">/</span>option<span class="token operator">&gt;</span>
<span class="token function">#foreach</span><span class="token punctuation">(</span>$item <span class="token keyword">in</span> $enumTag<span class="token punctuation">.</span><span class="token function">getEnumsByType</span><span class="token punctuation">(</span><span class="token string">&quot;COMMON_BOOL&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
    <span class="token operator">&lt;</span>option value<span class="token operator">=</span><span class="token string">&quot;$item.value&quot;</span> #<span class="token keyword">if</span><span class="token punctuation">(</span>$item<span class="token punctuation">.</span>value<span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span>$edit<span class="token punctuation">.</span>configType<span class="token punctuation">)</span><span class="token punctuation">)</span>seleced#end<span class="token operator">&gt;</span>$item<span class="token punctuation">.</span>text<span class="token operator">&lt;</span><span class="token operator">/</span>option<span class="token operator">&gt;</span>
#end
<span class="token operator">&lt;</span><span class="token operator">/</span>select<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
</code></pre>
<h3 id="&#x8868;&#x683C;&#x5185;&#x679A;&#x4E3E;&#x7FFB;&#x8BD1;">&#x8868;&#x683C;&#x5185;&#x679A;&#x4E3E;&#x7FFB;&#x8BD1;</h3>
<p>&#x540E;&#x53F0;&#x6570;&#x636E;&#x8FD4;&#x56DE;&#x5404;&#x79CD;&#x679A;&#x4E3E;&#x6570;&#x5B57;,&#x5728;&#x8868;&#x683C;&#x5185;,&#x5C06;&#x679A;&#x4E3E;&#x6570;&#x5B57;&#x8F6C;&#x6362;&#x4E3A;&#x540D;&#x79F0;.</p>
<pre class="language-"><code class="lang-javascript"><span class="token keyword">var</span> datas <span class="token operator">=</span> $enumTag<span class="token punctuation">.</span><span class="token function">getEnumsJsonByType</span><span class="token punctuation">(</span><span class="token string">&quot;COMMON_BOOL&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token punctuation">{</span>
    field<span class="token operator">:</span> <span class="token string">&apos;status&apos;</span><span class="token punctuation">,</span>
    title<span class="token operator">:</span> <span class="token string">&apos;&#x72B6;&#x6001;&apos;</span><span class="token punctuation">,</span>
    align<span class="token operator">:</span> <span class="token string">&apos;center&apos;</span><span class="token punctuation">,</span>
    <span class="token function-variable function">formatter</span><span class="token operator">:</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">value<span class="token punctuation">,</span> row<span class="token punctuation">,</span> index</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> jQuery<span class="token punctuation">.</span>table<span class="token punctuation">.</span><span class="token function">selectDictLabel</span><span class="token punctuation">(</span>datas<span class="token punctuation">,</span> value<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre>
<h3 id="java&#x4EE3;&#x7801;&#x4F7F;&#x7528;&#x679A;&#x4E3E;">java&#x4EE3;&#x7801;&#x4F7F;&#x7528;&#x679A;&#x4E3E;</h3>
<p>&#x63D0;&#x9AD8;&#x4EE3;&#x7801;&#x7684;&#x53EF;&#x8BFB;&#x6027;,&#x53C8;&#x4E0D;&#x58F0;&#x660E;java&#x7684;enum&#x7C7B;</p>
<pre class="language-"><code class="lang-java">loginforInfo<span class="token punctuation">.</span><span class="token function">setLogType</span><span class="token punctuation">(</span><span class="token class-name">Enums</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getEnumsValueByCode</span><span class="token punctuation">(</span><span class="token string">&quot;LOG_TYPE&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;LOG_TYPE_IN&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<hr>
<h2 id="id&#x8F6C;name&#x7684;&#x7279;&#x522B;&#x65B9;&#x6CD5;">id&#x8F6C;name&#x7684;&#x7279;&#x522B;&#x65B9;&#x6CD5;</h2>
<pre class="language-"><code class="lang-java"><span class="token comment">//&#x63A5;&#x53E3;&#x58F0;&#x660E;</span>
<span class="token keyword">public</span> <span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">UserInfoVO</span><span class="token punctuation">&gt;</span></span> <span class="token function">selectUserVOListByPage</span><span class="token punctuation">(</span><span class="token class-name">UserInfoQueryModel</span> user<span class="token punctuation">,</span> <span class="token class-name">PageInfo</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">UserInfoVO</span><span class="token punctuation">&gt;</span></span> page<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">//controller&#x4E2D;&#x7684;&#x8C03;&#x7528;&#x60C5;&#x51B5;</span>
<span class="token class-name">SSOUser</span> ssoUser <span class="token operator">=</span> <span class="token class-name">SSOClientUtils</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">findCurrentUser</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// &#x975E;&#x8D85;&#x7EA7;&#x7BA1;&#x7406;&#x5458;&#xFF0C;&#x9650;&#x5B9A;&#x9ED8;&#x8BA4;&#x67E5;&#x8BE2;&#x5F53;&#x524D;&#x7528;&#x6237;&#x6240;&#x5728;&#x673A;&#x6784;&#x4E0B;&#x53CA;&#x5176;&#x4E0B;&#x7EA7;&#x4E0B;&#x7684;&#x7528;&#x6237;</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token class-name">SSOClientUtils</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">isAdmin</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> user<span class="token punctuation">.</span><span class="token function">getDeptCode</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">==</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    user<span class="token punctuation">.</span><span class="token function">setDeptCode</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token punctuation">{</span>ssoUser<span class="token punctuation">.</span><span class="token function">getCurrentDept</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getDeptCode</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token comment">//&#x8FD9;&#x8FB9;page&#x91CC;&#x9762;&#x8FD4;&#x56DE;&#x7684;&#x662F;&#x63A5;&#x53E3;&#x91CC;&#x9762;&#x58F0;&#x660E;&#x7684;UserInfoVO&#x5BF9;&#x8C61;</span>
userService<span class="token punctuation">.</span><span class="token function">selectUserVOListByPage</span><span class="token punctuation">(</span>user<span class="token punctuation">,</span> page<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">//&#x8C03;&#x7528;&#x6570;&#x636E;&#x7FFB;&#x8BD1;,&#x628A;&#x79DF;&#x6237;&#x53F7;&#x7FFB;&#x8BD1;&#x4E3A;&#x5BF9;&#x5E94;&#x7684;&#x79DF;&#x6237;&#x8BB0;&#x5F55;</span>
<span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">Map</span><span class="token punctuation">&gt;</span></span> list <span class="token operator">=</span> <span class="token class-name">DataTranslateUtils</span><span class="token punctuation">.</span><span class="token function">translate</span><span class="token punctuation">(</span>page<span class="token punctuation">.</span><span class="token function">getData</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token string">&quot;tenantCode&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;tenant&quot;</span><span class="token punctuation">,</span> <span class="token keyword">new</span> <span class="token class-name">TenantTranslateCallback</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
page<span class="token punctuation">.</span><span class="token function">setData</span><span class="token punctuation">(</span>list<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">//&#x8F93;&#x51FA;&#x9875;&#x9762;</span>
<span class="token keyword">return</span> <span class="token keyword">new</span> <span class="token class-name">ApiBaseResponse</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">PageInfo</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span> <span class="token class-name">RetStatusEnum</span><span class="token punctuation">.</span>SUCCESS<span class="token punctuation">,</span><span class="token class-name">Constants</span><span class="token punctuation">.</span>API_RESPONSE_SUCCESS_CODE<span class="token punctuation">,</span>
        <span class="token class-name">Constants</span><span class="token punctuation">.</span>API_RESPONSE_SUCCESS_MESSAGE<span class="token punctuation">,</span> page<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<p>&#x9875;&#x9762;&#x4F7F;&#x7528;&#x6570;&#x636E;,&#x5C55;&#x793A;&#x79DF;&#x6237;&#x540D;&#x79F0;</p>
<pre class="language-"><code class="lang-javascript">#<span class="token keyword">if</span><span class="token punctuation">(</span>$userTag<span class="token punctuation">.</span><span class="token function">isAdmin</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> $serverProperty<span class="token punctuation">.</span><span class="token function">findProperty</span><span class="token punctuation">(</span><span class="token string">&quot;mutiable.tenant&quot;</span><span class="token punctuation">,</span><span class="token string">&quot;false&quot;</span><span class="token punctuation">)</span> <span class="token operator">==</span> <span class="token string">&quot;true&quot;</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
    field<span class="token operator">:</span> <span class="token string">&apos;tenant.tenantName&apos;</span><span class="token punctuation">,</span>
    title<span class="token operator">:</span> <span class="token string">&apos;&#x79DF;&#x6237;&#x53F7;&apos;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
#end
</code></pre>
<p>&#x8BE6;&#x7EC6;&#x8BF7;&#x770B;user-app&#x4E2D;&#x7684;UserInfoController&#x548C;view/user-app/userInfo/list.vm</p>
<hr>
<h2 id="&#x5947;&#x7279;&#x7684;&#x5BFC;&#x51FA;&#x5B9E;&#x73B0;">&#x5947;&#x7279;&#x7684;&#x5BFC;&#x51FA;&#x5B9E;&#x73B0;</h2>
<h3 id="&#x5BFC;&#x51FA;&#x6309;&#x94AE;">&#x5BFC;&#x51FA;&#x6309;&#x94AE;</h3>
<pre class="language-"><code class="lang-javascript"><span class="token operator">&lt;</span>a <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;btn btn-warning&quot;</span> onclick<span class="token operator">=</span><span class="token string">&quot;jQuery.table.exportExcel()&quot;</span><span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>i <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;fa fa-download&quot;</span><span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>i<span class="token operator">&gt;</span> &#x5BFC;&#x51FA;
<span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span>
</code></pre>
<h3 id="controller&#x7F16;&#x5199;">controller&#x7F16;&#x5199;</h3>
<p>&#x4F7F;&#x7528;Exporter&#x6CE8;&#x89E3;</p>
<pre class="language-"><code class="lang-java"><span class="token annotation punctuation">@Exporter</span><span class="token punctuation">(</span>code<span class="token operator">=</span><span class="token string">&quot;OpLog&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">public</span> <span class="token annotation punctuation">@ResponseBody</span> <span class="token class-name">ApiBaseResponse</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">PageInfo</span><span class="token punctuation">&lt;</span><span class="token class-name">OperLogInfo</span><span class="token punctuation">&gt;</span><span class="token punctuation">&gt;</span></span> <span class="token function">search</span><span class="token punctuation">(</span><span class="token class-name">ModelMap</span> model <span class="token punctuation">,</span> <span class="token class-name">OperLogQuery</span> query <span class="token punctuation">,</span> <span class="token class-name">PageInfo</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">OperLogInfo</span><span class="token punctuation">&gt;</span></span> pageInfo<span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token keyword">if</span><span class="token punctuation">(</span>pageInfo <span class="token operator">==</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        pageInfo <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">PageInfo</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">OperLogInfo</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
</code></pre>
<h3 id="&#x5BFC;&#x51FA;&#x6A21;&#x677F;&#x914D;&#x7F6E;">&#x5BFC;&#x51FA;&#x6A21;&#x677F;&#x914D;&#x7F6E;</h3>
<pre class="language-"><code class="lang-xml"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>loginNameTranslate<span class="token punctuation">&quot;</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.union.user.translate.LoginNameTranslateCallback<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>opLogTemplate<span class="token punctuation">&quot;</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTemplate<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>fileName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>opLog<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>limit<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>20<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>translateCallback<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>list</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTranslateCallback<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>orgiFiledName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>operName<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>newFiledname<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>operUser<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>callback<span class="token punctuation">&quot;</span></span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>loginNameTranslate<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>list</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>itemList<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>list</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTemplateItem<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>fieldName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>id<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>name<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>id<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>

            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTemplateItem<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>fieldName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>menuName<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>name<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>&#x83DC;&#x5355;&#x540D;<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>

            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTemplateItem<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>fieldName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>functionName<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>name<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>&#x529F;&#x80FD;&#x540D;<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>

            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTemplateItem<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>fieldName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>method<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>name<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>&#x65B9;&#x6CD5;<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>

            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTemplateItem<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>fieldName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>operName<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>name<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>&#x64CD;&#x4F5C;&#x4EBA;<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTemplateItem<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>fieldName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>status<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>name<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>&#x64CD;&#x4F5C;&#x7ED3;&#x679C;<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>dicName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>COMMON_STATUS<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTemplateItem<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>fieldName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>operUser.sex<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>name<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>&#x6027;&#x522B;<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>dicName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>COMMON_SEX<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.istock.base.hyperExport.ExportTemplateItem<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>fieldName<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>operUser.email<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>name<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>&#x90AE;&#x7BB1;<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>list</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<p>&#x8BE6;&#x7EC6;&#x8BF7;&#x53C2;&#x8003; OpLogController , view/user-app/opLog/list.vm&#x548C;export-template.xml</p>
<hr>
<h2 id="&#x767B;&#x5F55;&#x7528;&#x6237;&#x654F;&#x611F;&#x7684;&#x673A;&#x6784;&#x6811;">&#x767B;&#x5F55;&#x7528;&#x6237;&#x654F;&#x611F;&#x7684;&#x673A;&#x6784;&#x6811;</h2>
<p>&#x968F;&#x7740;&#x767B;&#x5F55;&#x7528;&#x6237;&#x4E0D;&#x4E00;&#x6837;,&#x800C;&#x51FA;&#x73B0;&#x4E0D;&#x4E00;&#x6837;&#x7684;&#x673A;&#x6784;&#x9009;&#x62E9;&#x6811;,&#x53EA;&#x80FD;&#x770B;&#x5230;&#x5F53;&#x524D;&#x767B;&#x5F55;&#x7528;&#x6237;&#x6240;&#x5C5E;&#x673A;&#x6784;&#x53CA;&#x5176;&#x5B50;&#x673A;&#x6784;.</p>
<h3 id="&#x67E5;&#x8BE2;&#x7528;&#x673A;&#x6784;&#x6811;">&#x67E5;&#x8BE2;&#x7528;&#x673A;&#x6784;&#x6811;</h3>
<p><a href="images/query.PNG" data-lightbox="f6e5d987-038a-43ce-bb1c-5c62534e1cc4" data-title="&#x67E5;&#x8BE2;&#x7528;&#x673A;&#x6784;&#x6811;"><img src="images/query.PNG" alt="&#x67E5;&#x8BE2;&#x7528;&#x673A;&#x6784;&#x6811;"></a></p>
<p>&#x4E3B;&#x8981;&#x4F53;&#x73B0;&#x5728;,&#x79DF;&#x6237;&#x4E0D;&#x80FD;&#x9009;,&#x673A;&#x6784;&#x53EF;&#x4EE5;&#x591A;&#x9009;,&#x4E0D;&#x5B58;&#x5728;&#x4E0A;&#x4E0B;&#x7EA7;&#x673A;&#x6784;&#x7EA7;&#x8054;,&#x53C2;&#x8003;&#x7528;&#x6237;&#x67E5;&#x8BE2;&#x9875;&#x9762;&#x7684;&#x673A;&#x6784;&#x6811;&#x9009;&#x62E9;</p>
<pre class="language-"><code class="lang-javascript"><span class="token comment">//&#x673A;&#x6784;&#x6811;&#x63A7;&#x4EF6;&#x7684;&#x5751;</span>
<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;form-group&quot;</span> style<span class="token operator">=</span><span class="token string">&quot;width:345px&quot;</span><span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>label <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;col-sm-4 control-label&quot;</span> style<span class="token operator">=</span><span class="token string">&quot;width:auto&quot;</span><span class="token operator">&gt;</span>&#x673A;&#x6784;&#xFF1A;<span class="token operator">&lt;</span><span class="token operator">/</span>label<span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;col-sm-8&quot;</span><span class="token operator">&gt;</span>
        <span class="token operator">&lt;</span>div id<span class="token operator">=</span><span class="token string">&quot;selectDept&quot;</span><span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>

<span class="token comment">//&#x4F7F;&#x7528;velocity,&#x76F4;&#x63A5;&#x6E32;&#x67D3;treeData</span>
<span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token string">&quot;#selectDept&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">TreePicker</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    name<span class="token operator">:</span><span class="token string">&quot;deptCode&quot;</span><span class="token punctuation">,</span>
    mode<span class="token operator">:</span><span class="token string">&quot;multi&quot;</span><span class="token punctuation">,</span>
    data<span class="token operator">:</span>$treeData
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<p>controller&#x4E2D;&#x7684;&#x4F7F;&#x7528;</p>
<pre class="language-"><code class="lang-java"><span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">Map</span><span class="token punctuation">&lt;</span><span class="token class-name">String</span> <span class="token punctuation">,</span> <span class="token class-name">Object</span><span class="token punctuation">&gt;</span><span class="token punctuation">&gt;</span></span> deptList <span class="token operator">=</span> deptService<span class="token punctuation">.</span><span class="token function">queryDeptTreeData</span><span class="token punctuation">(</span>user<span class="token punctuation">.</span><span class="token function">getTenantNo</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> user<span class="token punctuation">.</span><span class="token function">getCurrentDept</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">!=</span> <span class="token keyword">null</span> <span class="token operator">?</span>user<span class="token punctuation">.</span><span class="token function">getCurrentDept</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getDeptCode</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">:</span><span class="token keyword">null</span> 
                <span class="token punctuation">,</span> <span class="token class-name">SSOClientUtils</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">isAdmin</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">,</span> <span class="token boolean">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
model<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;treeData&quot;</span><span class="token punctuation">,</span> JSON<span class="token punctuation">.</span><span class="token function">toJSONString</span><span class="token punctuation">(</span>deptList<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<h3 id="&#x7F16;&#x8F91;&#x7528;&#x673A;&#x6784;&#x6811;">&#x7F16;&#x8F91;&#x7528;&#x673A;&#x6784;&#x6811;</h3>
<p><a href="images/edit.PNG" data-lightbox="0fe287f4-a4c4-4cee-a555-34b58aebd169" data-title="&#x7F16;&#x8F91;&#x7528;&#x673A;&#x6784;&#x6811;"><img src="images/edit.PNG" alt="&#x7F16;&#x8F91;&#x7528;&#x673A;&#x6784;&#x6811;"></a></p>
<p>&#x4E3B;&#x8981;&#x4F53;&#x73B0;&#x5728;,&#x79DF;&#x6237;&#x4E0D;&#x53EF;&#x9009;,&#x673A;&#x6784;&#x90FD;&#x662F;&#x5355;&#x9009;,&#x53C2;&#x8003;&#x7528;&#x6237;&#x7F16;&#x8F91;&#x754C;&#x9762;&#x7684;&#x6240;&#x5C5E;&#x673A;&#x6784;</p>
<pre class="language-"><code class="lang-javascript"><span class="token comment">//&#x673A;&#x6784;&#x6811;&#x63A7;&#x4EF6;&#x7684;&#x5751;</span>
<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;form-group&quot;</span><span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>label <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;col-sm-3 control-label&quot;</span><span class="token operator">&gt;</span><span class="token operator">&lt;</span>span <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;required-icon&quot;</span><span class="token operator">&gt;</span><span class="token operator">*</span><span class="token operator">&lt;</span><span class="token operator">/</span>span<span class="token operator">&gt;</span>&#x7EC4;&#x7EC7;&#x673A;&#x6784;&#xFF1A;<span class="token operator">&lt;</span><span class="token operator">/</span>label<span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>div id<span class="token operator">=</span><span class="token string">&quot;deptTreeId&quot;</span> <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;col-sm-8 deptTree&quot;</span><span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>

<span class="token comment">//&#x4F7F;&#x7528;velocity,&#x76F4;&#x63A5;&#x6E32;&#x67D3;treeData</span>
<span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token string">&quot;#deptTreeId&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">TreePicker</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
            name<span class="token operator">:</span><span class="token string">&quot;deptCode&quot;</span><span class="token punctuation">,</span>
            mode<span class="token operator">:</span><span class="token string">&quot;single&quot;</span><span class="token punctuation">,</span>
            data<span class="token operator">:</span>$treeData<span class="token punctuation">,</span>
            <span class="token function-variable function">onselect</span><span class="token operator">:</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">node</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
                <span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token string">&quot;#tenantCode&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">val</span><span class="token punctuation">(</span>node<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>tenantCode<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token comment">//changeDept(node[0].tenantCode);</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<p>controller&#x4E2D;&#x7684;&#x4F7F;&#x7528;</p>
<pre class="language-"><code class="lang-java"><span class="token class-name">SSOUser</span> user <span class="token operator">=</span> <span class="token class-name">SSOClientUtils</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">findCurrentUser</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">Map</span><span class="token punctuation">&lt;</span><span class="token class-name">String</span> <span class="token punctuation">,</span> <span class="token class-name">Object</span><span class="token punctuation">&gt;</span><span class="token punctuation">&gt;</span></span> deptList <span class="token operator">=</span> deptService<span class="token punctuation">.</span><span class="token function">queryDeptTreeData</span><span class="token punctuation">(</span>user<span class="token punctuation">.</span><span class="token function">getTenantNo</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> user<span class="token punctuation">.</span><span class="token function">getCurrentDept</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">!=</span> <span class="token keyword">null</span> <span class="token operator">?</span>user<span class="token punctuation">.</span><span class="token function">getCurrentDept</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getDeptCode</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">:</span><span class="token keyword">null</span> 
        <span class="token punctuation">,</span> <span class="token class-name">SSOClientUtils</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">isAdmin</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span><span class="token boolean">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
model<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;treeData&quot;</span><span class="token punctuation">,</span> JSON<span class="token punctuation">.</span><span class="token function">toJSONString</span><span class="token punctuation">(</span>deptList<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<h3 id="&#x7F16;&#x8F91;&#x7528;&#x673A;&#x6784;&#x6811;2">&#x7F16;&#x8F91;&#x7528;&#x673A;&#x6784;&#x6811;2</h3>
<p><a href="images/edit2.PNG" data-lightbox="ebc9877d-ae9b-43a4-8c71-0ba81c613f8c" data-title="&#x7F16;&#x8F91;&#x7528;&#x673A;&#x6784;&#x6811;2"><img src="images/edit2.PNG" alt="&#x7F16;&#x8F91;&#x7528;&#x673A;&#x6784;&#x6811;2"></a></p>
<p>&#x4E3B;&#x8981;&#x4F53;&#x73B0;&#x5728;,&#x79DF;&#x6237;&#x53EF;&#x9009;,&#x79DF;&#x6237;&#x548C;&#x673A;&#x6784;&#x90FD;&#x662F;&#x5355;&#x9009;,&#x53C2;&#x8003;&#x7EC4;&#x7EC7;&#x7F16;&#x8F91;&#x9875;&#x9762;&#x7684;&#x4E0A;&#x7EA7;&#x673A;&#x6784;</p>
<pre class="language-"><code class="lang-javascript"><span class="token comment">//&#x673A;&#x6784;&#x6811;&#x63A7;&#x4EF6;&#x7684;&#x5751;</span>
<span class="token operator">&lt;</span>div id<span class="token operator">=</span><span class="token string">&quot;parent&quot;</span> <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;form-group&quot;</span><span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>input type<span class="token operator">=</span><span class="token string">&quot;hidden&quot;</span> name<span class="token operator">=</span><span class="token string">&quot;tenantCode&quot;</span> id<span class="token operator">=</span><span class="token string">&quot;tenantCode&quot;</span><span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>input type<span class="token operator">=</span><span class="token string">&quot;hidden&quot;</span> name<span class="token operator">=</span><span class="token string">&quot;parentId&quot;</span> id<span class="token operator">=</span><span class="token string">&quot;parentId&quot;</span><span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>label <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;col-sm-3 control-label &quot;</span><span class="token operator">&gt;</span>&#x4E0A;&#x7EA7;&#x7EC4;&#x7EC7;&#xFF1A;<span class="token operator">&lt;</span><span class="token operator">/</span>label<span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;col-sm-8&quot;</span><span class="token operator">&gt;</span>
        <span class="token operator">&lt;</span>div id<span class="token operator">=</span><span class="token string">&quot;selectDept&quot;</span><span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>

<span class="token comment">//&#x4F7F;&#x7528;velocity,&#x76F4;&#x63A5;&#x6E32;&#x67D3;treeData</span>
<span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token string">&quot;#selectDept&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">TreePicker</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    name<span class="token operator">:</span><span class="token string">&quot;selectDept&quot;</span><span class="token punctuation">,</span>
    mode<span class="token operator">:</span><span class="token string">&quot;single&quot;</span><span class="token punctuation">,</span>
    data<span class="token operator">:</span>$treeData<span class="token punctuation">,</span>
    <span class="token function-variable function">onselect</span><span class="token operator">:</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">node</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token string">&quot;#tenantCode&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">val</span><span class="token punctuation">(</span>node<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>tenantCode<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token string">&quot;#parentId&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">val</span><span class="token punctuation">(</span><span class="token string">&quot;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">if</span><span class="token punctuation">(</span>node<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>nodeType <span class="token operator">==</span> <span class="token string">&quot;dept&quot;</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token string">&quot;#parentId&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">val</span><span class="token punctuation">(</span>node<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>id<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token keyword">else</span><span class="token punctuation">{</span>
        <span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token string">&quot;#parentId&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">val</span><span class="token punctuation">(</span><span class="token string">&quot;0&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<p>controller&#x4E2D;&#x7684;&#x4F7F;&#x7528;</p>
<pre class="language-"><code class="lang-java"><span class="token comment">//&#x7ED9;&#x5B9A;&#x9875;&#x9762;&#x80FD;&#x591F;&#x9009;&#x62E9;&#x7684;&#x7EC4;&#x7EC7;&#x673A;&#x6784;&#x6811;</span>
<span class="token class-name">SSOUser</span> user <span class="token operator">=</span> <span class="token class-name">SSOClientUtils</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">findCurrentUser</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">Map</span><span class="token punctuation">&lt;</span><span class="token class-name">String</span> <span class="token punctuation">,</span> <span class="token class-name">Object</span><span class="token punctuation">&gt;</span><span class="token punctuation">&gt;</span></span> deptList <span class="token operator">=</span> deptService<span class="token punctuation">.</span><span class="token function">queryDeptTreeData</span><span class="token punctuation">(</span>user<span class="token punctuation">.</span><span class="token function">getTenantNo</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> user<span class="token punctuation">.</span><span class="token function">getCurrentDept</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">!=</span> <span class="token keyword">null</span> <span class="token operator">?</span>user<span class="token punctuation">.</span><span class="token function">getCurrentDept</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getDeptCode</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">:</span><span class="token keyword">null</span> 
        <span class="token punctuation">,</span> <span class="token class-name">SSOClientUtils</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">isAdmin</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span><span class="token boolean">true</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
model<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;treeData&quot;</span><span class="token punctuation">,</span> JSON<span class="token punctuation">.</span><span class="token function">toJSONString</span><span class="token punctuation">(</span>deptList<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<hr>
<h2 id="&#x4E0B;&#x62C9;&#x591A;&#x9009;">&#x4E0B;&#x62C9;&#x591A;&#x9009;</h2>
<pre class="language-"><code class="lang-javascript"><span class="token comment">//&#x7528;&#x6237;&#x7F16;&#x8F91;&#x9875;&#x9762;&#x7684;&#x89D2;&#x8272;&#x5B57;&#x6BB5;,&#x6CE8;&#x610F;select&#x4E2D;&#x7684;multiple=&quot;multiple&quot;</span>
<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;form-group&quot;</span><span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>label <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;col-sm-3 control-label&quot;</span><span class="token operator">&gt;</span>&#x89D2;&#x8272;&#xFF1A;<span class="token operator">&lt;</span><span class="token operator">/</span>label<span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;col-sm-8 roleTree&quot;</span> <span class="token operator">&gt;</span>
        <span class="token operator">&lt;</span>select id<span class="token operator">=</span><span class="token string">&quot;roleTreeId&quot;</span> <span class="token keyword">class</span><span class="token operator">=</span><span class="token string">&quot;form-control m-b&quot;</span> multiple<span class="token operator">=</span><span class="token string">&quot;multiple&quot;</span> name<span class="token operator">=</span><span class="token string">&quot;roleIds&quot;</span><span class="token operator">&gt;</span>
        <span class="token function">#foreach</span><span class="token punctuation">(</span>$item <span class="token keyword">in</span> $roles<span class="token punctuation">)</span>
            <span class="token operator">&lt;</span>option value<span class="token operator">=</span><span class="token string">&quot;$item.id&quot;</span> #<span class="token keyword">if</span><span class="token punctuation">(</span>$item<span class="token punctuation">.</span>selected<span class="token punctuation">)</span>selected#end<span class="token operator">&gt;</span>$item<span class="token punctuation">.</span>roleName<span class="token operator">&lt;</span><span class="token operator">/</span>option<span class="token operator">&gt;</span>
        #end
        <span class="token operator">&lt;</span><span class="token operator">/</span>select<span class="token operator">&gt;</span>
    <span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
</code></pre>
<pre class="language-"><code class="lang-java"><span class="token comment">//controller&#x4E2D;,&#x4F7F;&#x7528;&#x6570;&#x7EC4;&#x63A5;&#x53D7;&#x524D;&#x7AEF;&#x9875;&#x9762;&#x7684;&#x591A;&#x9009;&#x53C2;&#x6570;</span>
<span class="token annotation punctuation">@OperLog</span><span class="token punctuation">(</span>functionName<span class="token operator">=</span><span class="token string">&quot;&#x4FEE;&#x6539;&quot;</span><span class="token punctuation">,</span>menuName<span class="token operator">=</span><span class="token string">&quot;&#x7528;&#x6237;&#x7BA1;&#x7406;&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">public</span> <span class="token class-name">ApiBaseResponse</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">Boolean</span><span class="token punctuation">&gt;</span></span> <span class="token function">editSave</span><span class="token punctuation">(</span><span class="token class-name">UserInfo</span> user <span class="token punctuation">,</span> <span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> roleIds<span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token class-name">String</span> rspCode <span class="token operator">=</span> <span class="token class-name">Constants</span><span class="token punctuation">.</span>API_RESPONSE_SUCCESS_CODE<span class="token punctuation">;</span>
    <span class="token class-name">RetStatusEnum</span> rspStatus <span class="token operator">=</span> <span class="token class-name">RetStatusEnum</span><span class="token punctuation">.</span>SUCCESS<span class="token punctuation">;</span>
</code></pre>
<hr>
<h2 id="&#x4E0B;&#x62C9;ajax&#x591A;&#x9009;">&#x4E0B;&#x62C9;ajax&#x591A;&#x9009;</h2>
<pre class="language-"><code class="lang-html">//&#x4F7F;&#x7528;noselect2,&#x7CFB;&#x7EDF;&#x4E0D;&#x4F1A;&#x628A;select&#x7EC4;&#x4EF6;&#x81EA;&#x52A8;&#x4F7F;&#x7528;select2&#x6E32;&#x67D3;
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>form-group<span class="token punctuation">&quot;</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>userSelect<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>    
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>label</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>col-sm-4 control-label<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>required-icon<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>*<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">&gt;</span></span>&#x7528;&#x6237;&#x9009;&#x62E9;&#xFF1A;<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>label</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>col-sm-8<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>hidden<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>userParamStr<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>select</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>userParam<span class="token punctuation">&quot;</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>userParam<span class="token punctuation">&quot;</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>form-control m-b noselect2<span class="token punctuation">&quot;</span></span> <span class="token attr-name">multiple</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>multiple<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        #foreach($item in $selectUserList)
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>option</span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>$item.userId<span class="token punctuation">&quot;</span></span> <span class="token attr-name">selected</span><span class="token punctuation">&gt;</span></span>$item.userName ( $item.loginName ) <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>option</span><span class="token punctuation">&gt;</span></span>
        #end
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>select</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<pre class="language-"><code class="lang-javascript"><span class="token comment">//&#x81EA;&#x5DF1;&#x4F7F;&#x7528;js,&#x5C06;&#x7A7A;&#x95F4;userParam&#x6E32;&#x67D3;&#x4E3A;select2&#x63A7;&#x4EF6;,&#x5E76;&#x4E14;&#x5141;&#x8BB8;&#x8F93;&#x5165;&#x641C;&#x7D22;&#x6761;&#x4EF6;,&#x53D8;&#x66F4;option,&#x5E76;&#x591A;&#x9009;</span>
<span class="token function">jQuery</span><span class="token punctuation">(</span><span class="token string">&quot;#userParam&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">select2</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    allowClear<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>    <span class="token comment">//&#x9009;&#x4E2D;&#x4E4B;&#x540E;&#xFF0C;&#x53EF;&#x624B;&#x52A8;&#x70B9;&#x51FB;&#x5220;&#x9664;            </span>
    placeholder<span class="token operator">:</span> <span class="token string">&quot;&#x8F93;&#x5165;&#x641C;&#x7D22;...&quot;</span><span class="token punctuation">,</span>
    multiple<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
    minimumInputLength<span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
    ajax<span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token function-variable function">url</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">params</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">return</span> jQuery<span class="token punctuation">.</span>common<span class="token punctuation">.</span><span class="token function">transferUrl</span><span class="token punctuation">(</span>prefix <span class="token operator">+</span> <span class="token string">&quot;/queryUserList.do&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        delay<span class="token operator">:</span> <span class="token number">250</span><span class="token punctuation">,</span>
        method<span class="token operator">:</span><span class="token string">&quot;post&quot;</span><span class="token punctuation">,</span>
        <span class="token function-variable function">data</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">params</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">return</span> <span class="token punctuation">{</span>
                <span class="token string">&quot;userName&quot;</span><span class="token operator">:</span> params<span class="token punctuation">.</span>term<span class="token punctuation">,</span> <span class="token comment">// search term</span>
                <span class="token string">&quot;current&quot;</span><span class="token operator">:</span> params<span class="token punctuation">.</span>page<span class="token operator">||</span><span class="token number">1</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        dataType<span class="token operator">:</span> <span class="token string">&apos;json&apos;</span><span class="token punctuation">,</span>
        <span class="token function-variable function">processResults</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">data<span class="token punctuation">,</span> params</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            params<span class="token punctuation">.</span>page <span class="token operator">=</span> params<span class="token punctuation">.</span>page <span class="token operator">||</span> <span class="token number">1</span><span class="token punctuation">;</span>
            <span class="token function">jQuery</span><span class="token punctuation">(</span>data<span class="token punctuation">.</span>result<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">each</span><span class="token punctuation">(</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">i<span class="token punctuation">,</span>n</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
                <span class="token comment">//&#x5FC5;&#x987B;&#x8981;&#x6709;id&#x548C;text&#x5C5E;&#x6027;,&#x5426;&#x5219;select2&#x4F1A;&#x62A5;&#x9519;</span>
                n<span class="token punctuation">.</span>text <span class="token operator">=</span> n<span class="token punctuation">.</span>userName<span class="token operator">+</span><span class="token string">&quot; ( &quot;</span><span class="token operator">+</span>n<span class="token punctuation">.</span>loginName<span class="token operator">+</span><span class="token string">&quot; ) &quot;</span><span class="token punctuation">;</span>
                n<span class="token punctuation">.</span>id <span class="token operator">=</span> n<span class="token punctuation">.</span>userId<span class="token punctuation">;</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">return</span> <span class="token punctuation">{</span>
                results<span class="token operator">:</span> data<span class="token punctuation">.</span>result<span class="token punctuation">,</span>
                pagination<span class="token operator">:</span> <span class="token punctuation">{</span>
                    more<span class="token operator">:</span> params<span class="token punctuation">.</span>page <span class="token operator">&lt;</span> data<span class="token punctuation">.</span>totalPage
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        cache<span class="token operator">:</span><span class="token boolean">true</span>
    <span class="token punctuation">}</span>
    <span class="token punctuation">,</span><span class="token function-variable function">escapeMarkup</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">markup</span><span class="token punctuation">)</span> <span class="token punctuation">{</span> <span class="token keyword">return</span> markup<span class="token punctuation">;</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<pre class="language-"><code class="lang-java"><span class="token comment">//&#x540E;&#x53F0;&#x63A5;&#x53D7;&#x641C;&#x7D22;&#x6761;&#x4EF6;,&#x8FC7;&#x6EE4;&#x5E76;&#x5206;&#x9875;,&#x5C55;&#x793A;option&#x6570;&#x636E;</span>
<span class="token annotation punctuation">@RequestMapping</span><span class="token punctuation">(</span><span class="token string">&quot;queryUserList&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">public</span> <span class="token annotation punctuation">@ResponseBody</span> <span class="token class-name">ApiBaseResponse</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">List</span><span class="token punctuation">&lt;</span><span class="token class-name">SSOUser</span><span class="token punctuation">&gt;</span><span class="token punctuation">&gt;</span></span> <span class="token function">queryUserList</span><span class="token punctuation">(</span><span class="token class-name">String</span> userName <span class="token punctuation">,</span> <span class="token class-name">PageInfo</span> page<span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">SSOUser</span><span class="token punctuation">&gt;</span></span> userList <span class="token operator">=</span> flowAuthService<span class="token punctuation">.</span><span class="token function">findAllUserList</span><span class="token punctuation">(</span>userName <span class="token punctuation">,</span> page<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token keyword">new</span> <span class="token class-name">ApiBaseResponse</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">List</span><span class="token punctuation">&lt;</span><span class="token class-name">SSOUser</span><span class="token punctuation">&gt;</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span><span class="token class-name">RetStatusEnum</span><span class="token punctuation">.</span>SUCCESS <span class="token punctuation">,</span><span class="token class-name">ApiBaseResponse</span><span class="token punctuation">.</span>DEFAULT_RESPONSE_CODE_SUCCESS<span class="token punctuation">,</span> <span class="token class-name">ApiBaseResponse</span><span class="token punctuation">.</span>DEFAULT_RESPONSE_MESSAGE_SUCCESS<span class="token punctuation">,</span> userList<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre>
<hr>
<h2 id="&#x4E24;&#x4E2A;&#x5C42;&#x7EA7;&#x7684;&#x5C5E;&#x6027;&#x914D;&#x7F6E;">&#x4E24;&#x4E2A;&#x5C42;&#x7EA7;&#x7684;&#x5C5E;&#x6027;&#x914D;&#x7F6E;</h2>
<h3 id="&#x4F7F;&#x7528;properties&#x6587;&#x4EF6;&#x7684;&#x914D;&#x7F6E;">&#x4F7F;&#x7528;properties&#x6587;&#x4EF6;&#x7684;&#x914D;&#x7F6E;</h3>
<p>&#x5E94;&#x7528;&#x4E2D;,&#x4F7F;&#x7528;properties&#x6587;&#x4EF6;&#x7684;&#x914D;&#x7F6E;,&#x6211;&#x4EEC;&#x4F7F;&#x7528;spring&#x52A0;&#x8F7D;&#x914D;&#x7F6E;&#x6587;&#x4EF6;,properties&#x4E2D;&#x7684;&#x914D;&#x7F6E;,&#x4E00;&#x822C;&#x4EE3;&#x8868;&#x7CFB;&#x7EDF;&#x7EA7;&#x522B;&#x7684;&#x914D;&#x7F6E;,&#x4E0D;&#x5141;&#x8BB8;&#x968F;&#x4FBF;&#x4FEE;&#x6539;,&#x4FEE;&#x6539;&#x4E00;&#x822C;&#x9700;&#x8981;&#x91CD;&#x542F;.</p>
<p>&#x6211;&#x4EEC;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x4E0B;&#x9762;&#x7684;&#x65B9;&#x5F0F;,&#x9759;&#x6001;&#x7684;&#x8C03;&#x7528;&#x5230;properties&#x6587;&#x4EF6;&#x5185;&#x7684;&#x5C5E;&#x6027;&#x503C;.</p>
<pre class="language-"><code class="lang-java"><span class="token class-name">PropertyStaticLoader</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">findProperty</span><span class="token punctuation">(</span><span class="token string">&quot;passwd.expire&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;90&quot;</span><span class="token punctuation">)</span>
</code></pre>
<p>&#x5982;&#x679C;&#x5728;&#x9875;&#x9762;,&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;PropertyTag&#x8C03;&#x7528;&#x5230;properties&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x7684;&#x503C;</p>
<pre class="language-"><code class="lang-html">$serverProperty.findProperty(&quot;mutiable.tenant&quot;,&quot;false&quot;)
</code></pre>
<h3 id="&#x4F7F;&#x7528;db&#x7684;&#x914D;&#x7F6E;">&#x4F7F;&#x7528;DB&#x7684;&#x914D;&#x7F6E;</h3>
<p>&#x5728;DB&#x4E2D;,&#x6709;&#x4E00;&#x5F20;&#x8868;SYS_CONFIG_INFO&#x8868;,&#x91CC;&#x9762;&#x4E5F;&#x53EF;&#x4EE5;&#x5B58;&#x50A8;K-V&#x914D;&#x7F6E;.DB&#x4E2D;&#x7684;&#x914D;&#x7F6E;,&#x5B58;&#x50A8;&#x5728;&#x7F13;&#x5B58;&#x91CC;,&#x6BCF;&#x6B21;&#x901A;&#x8FC7;&#x9875;&#x9762;&#x4FEE;&#x6539;&#x914D;&#x7F6E;,&#x90FD;&#x4F1A;&#x5237;&#x65B0;&#x7F13;&#x5B58;,&#x518D;&#x6B21;&#x8BBF;&#x95EE;&#x5C31;&#x80FD;&#x83B7;&#x5F97;&#x914D;&#x7F6E;&#x503C;&#x7684;&#x53D8;&#x66F4;.</p>
<p>&#x5728;java&#x7A0B;&#x5E8F;&#x4E2D;,&#x53EF;&#x4EE5;&#x8FD9;&#x4E48;&#x8BBF;&#x95EE;DB&#x7684;&#x914D;&#x7F6E;&#x9879;</p>
<pre class="language-"><code class="lang-java"><span class="token class-name">Configs</span><span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">findByKey</span><span class="token punctuation">(</span><span class="token string">&quot;&#x914D;&#x7F6E;Key&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<p>&#x5728;&#x9875;&#x9762;&#x4E0A;,&#x6211;&#x4EEC;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;tag,&#x8BBF;&#x95EE;DB&#x7684;&#x914D;&#x7F6E;&#x9879;</p>
<pre class="language-"><code class="lang-html">$configTag.findByKey(&quot;&#x914D;&#x7F6E;Key&quot;)
</code></pre>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; senvon 2020 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">Bilibili,&#x5934;&#x6761;&#x53F7;,&#x5FAE;&#x4FE1;&#x53F7;&#xFF1A;&#x8BF7;&#x641C;&#x7D22;  &#x968F;senvon&#x98DE;
2020-07-26 12:45:10
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="sso.html" class="navigation navigation-prev " aria-label="Previous page: SSO集成">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../test/readme.html" class="navigation navigation-next " aria-label="Next page: 关于测试">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"常见代码示例","level":"1.5.5","depth":2,"next":{"title":"关于测试","level":"1.6","depth":1,"path":"test/readme.md","ref":"test/readme.md","articles":[{"title":"单元测试","level":"1.6.1","depth":2,"path":"test/unitTest.md","ref":"test/unitTest.md","articles":[]},{"title":"功能测试","level":"1.6.2","depth":2,"path":"test/function.md","ref":"test/function.md","articles":[]},{"title":"非功能测试","level":"1.6.3","depth":2,"path":"test/noFunction.md","ref":"test/noFunction.md","articles":[]}]},"previous":{"title":"SSO集成","level":"1.5.4","depth":2,"path":"backSample/sso.md","ref":"backSample/sso.md","articles":[]},"dir":"ltr"},"config":{"plugins":["search-plus","-lunr","-search","tbfed-pagefooter","simple-page-toc","insert-logo","back-to-top-button","toggle-chapters","code","lightbox","copy-code-button","search-pro","emphasize","splitter","mermaid-gb3","-sharing","sharing-plus","prism","-highlight","flexible-alerts","page-toc-button","baidu","pageview-count","bilibili","donate","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy senvon 2020","modify_label":"Bilibili,头条号,微信号：请搜索  随senvon飞"},"prism":{},"emphasize":{},"livereload":{},"simple-page-toc":{"maxDepth":5,"skipFirstH1":true},"splitter":{},"search-pro":{},"bilibili":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"code":{"copyButtons":true},"donate":{"alipay":"images/toutiao.jpg","alipayText":"头条号","button":"联系方式","title":"联系方式","wechat":"images/weixin.PNG","wechatText":"公众号"},"fontsettings":{"theme":"white","family":"sans","size":2},"mermaid-gb3":{},"lightbox":{"jquery":true,"sameUuid":false},"page-toc-button":{"maxTocDepth":5,"minTocSize":2},"back-to-top-button":{},"pageview-count":{},"flexible-alerts":{"danger":{"className":"danger","icon":"fa fa-ban","label":"Attention"},"note":{"className":"info","icon":"fa fa-info-circle","label":"Note"},"style":"flat","tip":{"className":"tip","icon":"fa fa-lightbulb-o","label":"Tip"},"warning":{"className":"warning","icon":"fa fa-exclamation-triangle","label":"Warning"}},"copy-code-button":{},"baidu":{"token":"51550945f89f43511a44753249ab6675"},"sharing":{"qq":true,"all":["douban","qq","qzone","weibo"],"douban":false,"facebook":false,"weibo":true,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":false,"messenger":false,"line":false,"vk":false,"pocket":false,"google":false,"viber":false,"stumbleupon":false,"qzone":true,"linkedin":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"toggle-chapters":{},"insert-logo":{"style":"background: none; height: 170px; width: 200px","url":"images/logo3.jpg"},"search-plus":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"启路框架-使用手册","language":"zh-hans","backplugin":["lightbox"],"gitbook":"*","description":"启路框架-使用手册"},"file":{"path":"backSample/example.md","mtime":"2020-07-26T04:45:10.802Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-10-19T02:57:27.717Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-insert-logo/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-toggle-chapters/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lightbox/js/lightbox.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-baidu/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    <script src="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>

    </body>
</html>

